package com.topscomm.mis.cbb.pm.api;

import com.topscomm.cbo.pojo.CboApprovalNodeEntity;
import com.topscomm.cbo.pojo.CboApprovalNodeInsEntity;
import com.topscomm.mis.cbb.pm.util.FlowNode;
import com.topscomm.pub.vo.Page;
import com.topscomm.tap.common.SessionUserBean;

import java.util.List;
import java.util.Map;

public interface ITaskService {
    Map<String, Object> getGanttInfo(Map<String, Object> paramMap);

    Map<String, Object> insert(Map<String, Object> paramMap);

    void update(Map<String, Object> paramMap);

    Map<String, Object> load(Map<String, Object> paramMap);

    void delete(Map<String, Object> paramMap);

    Page list(Map<String, Object> paraMap, String sqlWhere);

    // 节点list、wbs的map
    void initFlowTask(Map<String, Object> paraMap, List<FlowNode> flowNodeList, Map<String, Object> paramMap, String parentCode, String flowinsid, Boolean findRound, int loopTimes, int useTimes);

    void issueTask(Map<String, Object> paramMap);

    void deliveryWbs(Map<String, Object> paramMap);

    void startTask(Map<String, Object> paramMap);

    void completeTask(Map<String, Object> paramMap);

    void backTask(Map<String, Object> paramMap);

    Map<String, Object> validateComplete(Map<String, Object> taskInfo, boolean autoValidate);

    int notCompleteNum(Map<String, Object> taskInfo, int type);

    List<Integer> getNotCompleteStatus();

    void refreshNextTaskInfo(Map<String, Object> docInfo, CboApprovalNodeEntity nodeEntity, CboApprovalNodeInsEntity nodeInsEntity);

    void backGenerateTaskInfo(Map<String, Object> docInfo, CboApprovalNodeEntity nodeEntity, CboApprovalNodeInsEntity nodeInsEntity, int useTimes);

    void backLabourTask(Map<String, Object> taskInfo);

    void confirmBackLabourTask(Map<String, Object> taskInfo);

    void closeEditLabourTask(Map<String, Object> taskInfo);

    Map<String, Object> backRecordInfo(Map<String, Object> paramMap);

    SessionUserBean generateSessionUserBean(String userCode, long userId);

    void saveBatchTask(Map<String, Object> taskInfo);

    void backupTask(String whereSql, Map<String, Object> pmWbsChangeInfo);

    void changeTaskByFlow(String uuCode, List<FlowNode> nodeList, Map<String, Object> pmWbsInfo, String parentCode, String flowInsId);
    void changeTaskByNode(Map<String, Object> wbsInfo,FlowNode node,Map<String,Object> paraMap);

    List<Map<String, Object>> getAllSubTaskByNode(Map<String,Object> paraMap, Boolean returnFlow);

    void refreshSonNodeDateTime(CboApprovalNodeInsEntity parentEntity, CboApprovalNodeInsEntity subEntity);

    void loseTask(List<FlowNode> nodeList, Boolean isSonFlow, String uuCode, String flowInsId);
}
